import { defineConfig } from 'vite'
import UnoCSS from 'unocss/vite'
import vue from '@vitejs/plugin-vue'
import qiankun from 'vite-plugin-qiankun'

export default defineConfig({
  plugins: [
    vue(),
    UnoCSS({
      mode: process.env.NODE_ENV === 'development' ? 'shadow-dom' : 'vue-scoped'
    }),
    qiankun('event-app', { useDevMode: true })
  ],
  base: '/micro/event/',
  resolve: {
    alias: {
      '@': '/src'
    }
  },
  server: {
    port: 5805,
    origin: 'http://localhost:5805'
  }
})
